public class Bool01
{
    public static void main(String[] args)
    {
        int a1 = 10;
        int a2 = 10;
        boolean result1 = (a1 == a2);
        boolean result2 = (a1 != a2);

        System.out.println(result1);
        System.out.println(result2);

        System.out.println("=========================");

        boolean a = true;
        boolean result3 = !a; // result 为 false
        System.out.println(result3);

        System.out.println("=========================");

        boolean b1 = true;
        boolean b2 = false;
        boolean result4 = b1 & b2;
        boolean result5 = b1 | b2;
        boolean result6 = b1 ^ b2;

        System.out.println(result4);
        System.out.println(result5);
        System.out.println(result6);

        System.out.println("=========================");

        boolean c1 = true;
        boolean c2 = false;
        boolean result7 = c1 && c2;
        boolean result8 = c1 || c2;

        System.out.println(result7);
        System.out.println(result8);

        System.out.println("=========================");

        int n = 10;
        int m = 20;
        int max = (n > m) ? n : m; // max 为 20

        System.out.println(max);

        System.out.println("=========================");

        String str = "The boolean value is: ";
        boolean boolValue = true;

        String result = str + boolValue;

        System.out.println(result);

    }
}
